Skip to content

Deque for Efficient Window Management ( O(N) Time Complexity)#458

Open
Anshuman7080 wants to merge 1 commit intoKavya-24:masterfrom
Anshuman7080:master
Open

Deque for Efficient Window Management ( O(N) Time Complexity)#458
Anshuman7080 wants to merge 1 commit intoKavya-24:masterfrom
Anshuman7080:master

Conversation

@Anshuman7080
Copy link

Deque for Efficient Window Management: Using a deque to store indices of elements in the current window ensures that we can efficiently add and remove elements while maintaining the order.
O(N) Time Complexity: Each element is added and removed from the deque at most once, resulting in an O(N) time complexity.

This approach improve the performance of sliding window maximum calculation.

Kindly assign me this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant